package cn.ren.hai.core.response;

import lombok.Getter;
import lombok.Setter;

import java.util.ArrayList;
import java.util.List;

/**
 * @author 57556
 */
@Getter
@Setter
public class ResponseBean<T> {
    /**
     * 数据
     */
    private T data;
    /**
     * 状态码
     */
    private Integer code;
    /**
     * 说明信息
     */
    private String msg;
    /**
     * 状态 1正常 0错误
     */
    private Integer state = 1;

    public ResponseBean(T data, String msg, Integer state) {
        this.data = data;
        this.msg = msg;
        this.state = state;
    }

    public ResponseBean(T data, Integer state) {
        this.data = data;
        this.state = state;
    }
    public ResponseBean(String msg, Integer state, Integer code) {
        this.msg = msg;
        this.state = state;
        this.code = code;
    }

    public ResponseBean(T data, String msg) {
        this.data = data;
        this.msg = msg;
    }

    public ResponseBean(T data) {
        this.data = data;
    }

    public ResponseBean(String msg) {
        this.msg = msg;
    }

    public ResponseBean(Integer state) {
        this.state = state;
    }

    ResponseBean(Integer state, String msg) {
        this.state = state;
        this.msg = msg;
    }

    public ResponseBean() {

    }



}
